<template>
<!-- Cascader 级联选择器 -->
  <div id="app">
    <el-cascader :options='options' v-model='values' @change="handleChange">

    </el-cascader>
  </div>
</template>

<script>

export default {
  name: 'App',
  components: {
    
  },
  data:function(){
    return{
      values:[],
      options:[
        {
          value:'1',
          label:'鞋服',
          children:[
            {
            value:'1-1',
            label:"男装",
            children:[
              {
                value:'1-1-1',
                label:'夹克'
              }
            ]
            },
            {
              value:'1-2',
              label:'女装'
            }
          ]
        },
        {
          value:'2',
          label:'家电'
        }
      ]
    }
  },
  methods:{
    handleChange:function(val){
      console.log('选中数据为',val);

    }
  }
}
</script>

<style>
*{
  margin:0;
  padding: 0;
  box-sizing: border-box;
}
</style>
